﻿@{
	PageData["Title"] = "Freemium Administration";
    
    WebSecurity.RequireAuthenticatedUser();
    if (!Roles.IsUserInRole("admin")) {
    	Response.Redirect("~");
    }
    
    if (IsPost) {
        Freemium.UpdateFeatureByStockKeepingUnitMatrix();
    }   
}

<h1>Freemium Administration</h1>
<h2>Features by Product Matrix</h2>
@if (IsPost) {
    <span class="info">Configuration Updated!</span>
}

@Freemium.GetFeatureByStockKeepingUnitMatrixHtml(allowEdit : true, includeFormTag : true)

<p>
    <a href="@Href("~/Freemium/CreateFeature")">Create Feature</a> | <a href="@Href("~/Freemium/CreateSku")">Create SKU</a>
</p>